package com.zimin.cloud.web.controller.system;

import com.zimin.cloud.mine.pojo.system.business.AccountBO;
import com.zimin.cloud.mine.pojo.system.business.LoginBO;
import com.zimin.cloud.system.api.IAccountFeign;
import com.zimin.cloud.system.api.ILoginFeign;
import com.zimin.shared.pojo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

/**
 * @author zimin
 * @since 2022/1/29 5:22 下午
 */
@RestController
@RequestMapping("/web/system/login/api")
public class WebLoginController {

    @Autowired
    private ILoginFeign loginFeign;

    @PostMapping
    public Mono<Result> login(@RequestBody LoginBO loginBO) {
        return Mono.just(loginFeign.login(loginBO));
    }

}
